#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2018/10/23 15:38
# @Author  : supuchun
# @Site    :
# @File    : redis.py
import redis

class redisServer:
    def __init__(self):
        self.r = redis.Redis(host='r-2zea3c0ff18d2e94.redis.rds.aliyuncs.com', port=6379, db=0, password='b3bPVU8W',
                decode_responses=True)

    def getResultId(self):
        r_key = '1_0_8'
        result_id = self.r.get(r_key)
        #rr= self.set(r_key, result_id)
        #print(rr)
        #print(result_id)
        if result_id == "None":
            return False
        else:
            return result_id

a = redisServer()
rs = a.getResultId()
print(rs)